package org.tong.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.tong.bean.Score;
import org.tong.bean.Student;
import org.tong.dao.ScoreDao;
import org.tong.dao.StudentDao;

@Service
public class Atomikservice {
    @Autowired
    private StudentDao studentDao;

    @Autowired
    private ScoreDao scoreDao;

    @Transactional
    public void insert(Student student, Score score) {
        studentDao.insert(student);
        scoreDao.insert(score);
    }
}
